Program T1;
var x,y,t:longint;
function gcd(a,b:longint):longint;
begin
  if b=0 then exit(a);
  exit(gcd(b,a mod b));
end;
//辗转相除法求最大公约数
begin
  readln(x,y);
  t:=gcd(x,y);
  x:=x div t;
  y:=y div t;
  if y=1 then writeln(x) else writeln(x,'/',y);
end.